package com.example.flowable.service;

import com.alibaba.fastjson.JSONObject;
import com.example.db.model.IPage;
import com.example.flowable.model.TableModel;
import com.example.flowable.model.vo.TableModelVo;

import java.util.List;
import java.util.Map;

/**
 * @Classname TableModelService
 * @Description TODO
 * @Date 2022/8/16 22:41
 * @Created by XiongXiong
 * @Author: X.I.O
 */
public interface TableModelService {

    public IPage<TableModel> page(Integer pageNum, Integer pageSize, JSONObject object);

    public TableModel save(TableModel model);

    public TableModel updateById(TableModel model);

    public TableModel getById(Object id);

    public void createTable(TableModelVo tableModelVo);

    public TableModel getTableModelByTableName(String tableName);

    public Integer saveData(String tableName, Map<String,Object> map);

    public Integer updateDataById(String tableName,Map<String,Object> map);

    /**
     * 获取数据
     * @param tableName 表名
     * @param id   主键id
     * @return
     */
    public Map<String, Object> getData(String tableName,Object id);

    /**
     * 获取表单列表
     * @return
     */
    public List<TableModel> getTableModelList();


}
